package web.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import web.entity.User2;
import web.service.UserService2;

@RestController
@RequestMapping("/test")
public class TestContrioller {
    @Autowired
    private UserService2 userService;

    @PostMapping("/mySql1")
    public Object mySql1() {
        User2 user2 = userService.slave1(1L);
        return user2;
    }
    @PostMapping("/mySql2")
    public Object mySql2() {
        User2 user2 = userService.slave2(1L);
        return user2;
    }
    @PostMapping("/kbase")
    public Object kbase() {
        User2 kbase = userService.kbase(1l);
        return kbase;
    }
}
